package com.itheima.day04;

import java.util.Arrays;
import java.util.Comparator;

public class Demo12 {
    public static void main(String[] args) {
        Integer[] ints={12,23,4353,66,98,24,56};
        System.out.println(Arrays.toString(ints));
        Arrays.sort(ints);
        int i = Arrays.binarySearch(ints, 23);
        System.out.println("i = " + i);
        Arrays.sort(ints, (o1, o2) -> o1-o2);
        Arrays.sort(ints, (o1, o2) -> 0);

        Double[] dous= {1.2, 1.6, 2.4};
        Arrays.sort(dous, (o1, o2) -> Double.compare(o2, o1));
        System.out.println("dous = " + Arrays.toString(dous));




    }



}
